import javax.microedition.lcdui.*;
import net.rim.device.api.system.KeyListener;
import net.rim.device.api.system.TrackwheelListener;
import net.rim.device.api.ui.*;

public final class bj implements CommandListener, KeyListener,
		TrackwheelListener {

	private static final Command a = new Command("Cancel", 3, 2);

	public bj() {
		bh bh1;
		(bh1 = bh.b()).addCommand(a);
		bh1.setCommandListener(this);
		Ui.getUiEngine().getActiveScreen().addTrackwheelListener(this);
		Ui.getUiEngine().getActiveScreen().addKeyListener(this);
	}

	public final void commandAction(Command command, Displayable displayable) {
		if (command == a)
			bh.b().a(1, -7);
	}

	public final boolean trackwheelClick(int i, int j) {
		bh.b().a(1, -5);
		return true;
	}

	public final boolean trackwheelUnclick(int i, int j) {
		return false;
	}

	public final boolean trackwheelRoll(int i, int j, int k) {
		return false;
	}

	public final boolean keyChar(char c, int i, int j) {
		return false;
	}

	public final boolean keyDown(int i, int j) {
		if (i == 0x130000) {
			bh.b().a(1, -5);
			return true;
		} else {
			return false;
		}
	}

	public final boolean keyRepeat(int i, int j) {
		return false;
	}

	public final boolean keyStatus(int i, int j) {
		return false;
	}

	public final boolean keyUp(int i, int j) {
		return false;
	}

}